package fantasyday.wowzolo.web.account;

import fantasyday.wowzolo.web.common.DropDownChoiceDefaultValue;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.validation.validator.EmailAddressValidator;
import org.apache.wicket.validation.validator.StringValidator;

import java.util.Arrays;

public class AccountFieldsPanel extends Panel {

	public AccountFieldsPanel(String id) {
		super(id);
		
		add(new RequiredTextField("firstName"));
		add(new RequiredTextField("lastName"));
		add(new RequiredTextField("email").add(EmailAddressValidator.maximumLength(40)));
		add(new RequiredTextField("phone"));
		add(new RequiredTextField("address1").add(StringValidator.maximumLength(40)));
		add(new RequiredTextField("address2").add(StringValidator.maximumLength(40)));
		add(new RequiredTextField("city"));
		add(new RequiredTextField("state").add(StringValidator.maximumLength(4)));
		add(new RequiredTextField("zip").add(StringValidator.maximumLength(10)));
		add(new RequiredTextField("country").add(StringValidator.maximumLength(15)));
		add(new DropDownChoiceDefaultValue("languagePreference", Arrays.asList("english" ,"japanese"), 0));
		add(new DropDownChoiceDefaultValue("favouriteCategoryId", Arrays.asList("FISH" ,"DOGS", "REPTILES", "CATS", "BIRDS"), 0));
		add(new CheckBox("listOption"));
		add(new CheckBox("bannerOption"));
	}

}
